package com.knowledgegraph.common;

/**
 * 统一响应码常量
 * 与前端保持一致的错误码定义
 * 
 * @author system
 * @since 2024-01-01
 */
public class ResponseCode {
    
    // 通用响应码 (1000-1999)
    public static final int SUCCESS = 1000;
    public static final int PARAM_ERROR = 1001;
    public static final int DATA_NOT_FOUND = 1002;
    public static final int DATA_EXISTS = 1003;
    public static final int OPERATION_FAILED = 1004;
    public static final int PERMISSION_DENIED = 1005;
    
    // 认证相关响应码 (2000-2999)
    public static final int AUTH_SUCCESS = 2000;
    public static final int AUTH_FAILED = 2001;
    public static final int USER_NOT_FOUND = 2002;
    public static final int PASSWORD_ERROR = 2003;
    public static final int ACCOUNT_LOCKED = 2004;
    public static final int ACCOUNT_DISABLED = 2005;
    public static final int TOKEN_EXPIRED = 2006;
    public static final int TOKEN_INVALID = 2007;
    public static final int TOKEN_EXPIRED_TIME = 2008;
    public static final int TOKEN_MISSING = 2009;
    public static final int USERNAME_EXISTS = 2010;
    public static final int EMAIL_EXISTS = 2011;
    public static final int PHONE_EXISTS = 2012;
    public static final int VERIFY_CODE_ERROR = 2013;
    public static final int VERIFY_CODE_EXPIRED = 2014;
    public static final int PASSWORD_WEAK = 2015;
    
    // 用户相关响应码 (3000-3999)
    public static final int USER_SUCCESS = 3000;
    public static final int USER_UPDATE_FAILED = 3001;
    public static final int USER_AVATAR_FAILED = 3002;
    public static final int USER_PERMISSION_DENIED = 3003;
    public static final int USER_STATUS_ERROR = 3004;
    
    // 知识图谱相关响应码 (4000-4999)
    public static final int GRAPH_SUCCESS = 4000;
    public static final int NODE_CREATE_FAILED = 4001;
    public static final int NODE_NOT_FOUND = 4002;
    public static final int RELATION_CREATE_FAILED = 4003;
    public static final int RELATION_NOT_FOUND = 4004;
    public static final int GRAPH_QUERY_FAILED = 4005;
    
    // 文件相关响应码 (5000-5999)
    public static final int FILE_SUCCESS = 5000;
    public static final int FILE_UPLOAD_FAILED = 5001;
    public static final int FILE_FORMAT_ERROR = 5002;
    public static final int FILE_SIZE_ERROR = 5003;
    public static final int FILE_NOT_FOUND = 5004;
    
    // 系统相关响应码 (9000-9999)
    public static final int SYSTEM_SUCCESS = 9000;
    public static final int SYSTEM_MAINTENANCE = 9001;
    public static final int SYSTEM_BUSY = 9002;
    public static final int NETWORK_ERROR = 9003;
    public static final int REQUEST_TIMEOUT = 9004;
    public static final int UNKNOWN_ERROR = 9999;
    
    // HTTP状态码兼容 (保持与HTTP标准一致)
    public static final int HTTP_OK = 200;
    public static final int HTTP_CREATED = 201;
    public static final int HTTP_BAD_REQUEST = 400;
    public static final int HTTP_UNAUTHORIZED = 401;
    public static final int HTTP_FORBIDDEN = 403;
    public static final int HTTP_NOT_FOUND = 404;
    public static final int HTTP_INTERNAL_ERROR = 500;
}